def use_logging(func):
    def wrapper():
        print("%s is running" % func.__name__)
        return func()
    return wrapper
def foo():
    print('i am foo')
foo = use_logging(foo) 
foo()